#include <lib.h>
#define sem_getqueuesize	_sem_getqueuesize
#include <semaphore.h>

PUBLIC int sem_getqueuesize(sm, value)
sem_t* sm;
unsigned int* value;
{
  message m;
  
  m.m1_i1 = sm->id;

  if (_syscall(FS, SEM_GETQUEUESIZE, &m) < 0) return(-1);
  
  (*value) = m.m1_i1;
  
  return 0;
}
